package com.wangzhixuan.model.vo;

import java.io.Serializable;

import com.wangzhixuan.commons.constant.ApiCode;
import com.wangzhixuan.commons.scan.MyException;
import com.wangzhixuan.commons.utils.StringUtils;

public class DescribeVo implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 81871376176614047L;
	private Integer userId;
	private Integer workId;
	private String desDescrib;
	private String desPictureArr;
	private String[] desPictureArrList;
	
	public String getDesPictureArr() {
		return desPictureArr;
	}

	public void setDesPictureArr(String desPictureArr) {
		this.desPictureArr = desPictureArr;
	}

	public String[] getDesPictureArrList() {
		desPictureArrList = desPictureArr.split(",");
		return desPictureArrList;
	}

	public void checekParam() throws MyException{
		if(this.userId==null){
			 throw new MyException(ApiCode.CODE_501, "请重新登录");
		}
		if(this.workId==null){
			 throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
		}
		if (StringUtils.isBlank(desDescrib)) {
			throw new MyException(ApiCode.CODE_501, "请添加工作描述");
        }
		if(StringUtils.isBlank(desPictureArr)){
			 throw new MyException(ApiCode.CODE_501, "请添加图片");
		}
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getWorkId() {
		return workId;
	}

	public void setWorkId(Integer workId) {
		this.workId = workId;
	}

	public String getDesDescrib() {
		return desDescrib;
	}

	public void setDesDescrib(String desDescrib) {
		this.desDescrib = desDescrib;
	}



}
